$(function() {
	$("#left").load("../common/gover-left.html");
	var param = parseQueryString().param;
	var userId = sessionStorage.getItem("userId");
	var businessId = parseQueryString().businessId;
	var type = parseQueryString().type;
	var userType = parseQueryString().userType;
	var code = parseQueryString().code;
	$(".ystep1").loadStep({
		size: "small",
		color: "green",
		steps: [{
				title: "事项选择"
			},

			{
				title: "信息录入"
			},
			{
				title: "寄件选择"
			},
			{
				title: "取件选择"
			},
			{
				title: "提交成功"
			}
		]
	});
	$(".ystep1").setStep(1);
	my_vue = new Vue({
		el: '#vue_info',
		data: {
			apply: {
				accordingInfo: "",
				childType: "",
				legalTimeLimit: 5,
				name: "",
				applyMaterial: [

				],
				isCharge: "",
				dept: ""
			}
		},
		methods: {
			//获取事项详情
			detail: function() {
				this.$http.get(gover.getRepoInfo /*+"?t="+new Date().getMilliseconds()*/ , {
					code: code
				}).then(function(result) {
					console.log(toJson(result.data));
					if(result.data.success) {
						unMask();
						this.apply = result.data.data;
					} else {
						unMask();
						console.log(result.data.message);
					}

				}, function() {
					unMask();
				})
			},

			lastStep: function() {
				window.location = "selfHelpBusinessChooseList.html?businessId=" + businessId + "&type=" + type;
			},
			next: function() {
				window.location = "selfHelpFormInput.html?businessId=" + businessId + "&type=" + type + "&code=" + code + "&userType=" + userType;
			}

		},
		ready: function() {
			this.detail();
		}
	});
});